import { NavLink, useLocation, useParams, useSearchParams } from 'react-router'
import Space from '@/components/Space'
import ColorPicker from '@/components/ColorPicker/ColorPickerPanel'
import { ConfigProvider } from '@/components/Space/ConfigProvider'

const Home: React.FC = () => {
  let [_searchParams, setSearchParams] = useSearchParams()
  // let location = useLocation()
  return (
    <ConfigProvider space={{ size: 20 }}>
      <NavLink to="/dashboard">go dashboard</NavLink>
      <ColorPicker value="rgb(166 57 57)" />
      <Space className="container" direction="horizontal" wrap>
        <p>Card content</p>
        <p>Card content</p>
      </Space>
      <button
        onClick={() =>
          setSearchParams({
            name: 'zhangsan',
            age: '20'
          })
        }
      >
        change
      </button>
    </ConfigProvider>
  )
}

export default Home
